#!/bin/zsh
# Usage: git last [branch]

git log --pretty=%H ${1-$(git symbolic-ref refs/remotes/origin/HEAD)} | head -1 | xargs git checkout
